Open
Conversation
Commit 36e738e fixed the name passed to dlopen for libsqlite3.so. This patch fixes the names for other libraries as well.
Member
|
Hi Kristoffer, Holiday season... LGTM, but let me have a closer look. Lars or me will merge/comment soon. If this does not happen till the end of the week, feel free to kick us. Thanks, rck |
Author
|
No problem, same here :) |
Contributor
|
On Wed, Aug 15, 2018 at 07:32:07AM -0700, Kristoffer Grönlund wrote:
Subject: [PATCH] Fix so-names for additional libraries
Commit 36e738e fixed the name passed to dlopen for libsqlite3.so.
This patch fixes the names for other libraries as well.
---
db_mysql.c | 8 ++++----
db_postgres.c | 8 ++++----
db_sqlite2.c | 11 ++++-------
- dl_handle = dlopen("libmysqlclient.so", RTLD_LAZY);
+ dl_handle = dlopen("libmysqlclient.so.18", RTLD_LAZY);
- dl_handle = dlopen("libpq.so", RTLD_LAZY);
+ dl_handle = dlopen("libpq.so.5", RTLD_LAZY);
Not that easy.
Probably needs to have a configure.ac replacement define there somehow,
because distributions/distribution versions ship different versions of
these libraries. You hardcode .18, but others may be at older
versions still, or are at newer versions already
(debian/ubuntu are .20 afaics). Similar with libpq.
That was not a problem with sqlite3,
there (currently) is only the .0 out there, so I was
Same with sqlite2 (if someone really still wants to use that):
- dl_handle = dlopen("libsqlite.so", RTLD_LAZY);
+ dl_handle = dlopen("libsqlite.so.0", RTLD_LAZY);
But if "someone" was to fix the other instances,
that should be fixed properly for sqlite2/3 as well.
Note: csync2 with postgres and mysql would likely need a bit polish on
the table creation, index definition and probably SQL queries in general
to work "as intended" in all situations.
Cheers,
Lars
|
Author
|
Yeah, this is clearly not a proper fix, but we've had this patch laying around forever so I thought I should at least submit it for review :) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Commit 36e738e fixed the name passed to dlopen for libsqlite3.so.
This patch fixes the names for other libraries as well.